package com.xmtlxx.wms.mapper;

import com.xmtlxx.common.annotation.DataColumn;
import com.xmtlxx.common.annotation.DataPermission;
import com.xmtlxx.common.core.mapper.BaseMapperPlus;
import com.xmtlxx.wms.domain.PutTask;
import com.xmtlxx.wms.domain.bo.PutTaskBo;
import com.xmtlxx.wms.domain.vo.PutTaskVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 上架任务Mapper接口
 *
 * @author xmtlxx
 * @date 2022-08-15
 */
public interface PutTaskMapper extends BaseMapperPlus<PutTaskMapper, PutTask, PutTaskVo> {
    /**
     * 根据条件分页查询上架任务
     *
     * @param putTask 上架任务
     * @return Page PutTask
     */
    @DataPermission({
        @DataColumn(key = "tenantName", value = "p.create_by"),
        @DataColumn(key = "deptName", value = "p.dept_id"),
        @DataColumn(key = "userName", value = "p.create_by")
    })
    Page<PutTaskVo> selectPagePutTaskList(@Param("page") Page<PutTask> page,@Param("putTask") PutTaskBo putTask);

    /**
     * 查询上架任务列表
     *
     * @param putTask 上架任务
     * @return 上架任务集合
     */
    @DataPermission({
        @DataColumn(key = "tenantName", value = "p.create_by"),
        @DataColumn(key = "deptName", value = "p.dept_id"),
        @DataColumn(key = "userName", value = "p.create_by")
    })
    List<PutTaskVo> selectPutTaskList(@Param("putTask") PutTaskBo putTask);

    PutTaskVo selectPutTaskVoByID(String id);

    PutTaskVo queryPutTaskVoByWarehouseID(String id);
}
